<?php

namespace app\web\model;
use think\Model;
/**

 */
class TaskItemNote extends Model{
    // 开启自动写入时间戳字段
    //protected $autoWriteTimestamp = true;

	protected $insert = ['create_time','uid'];


	protected function setUidAttr(){
		return session('user_auth')['uid'];
	}
	protected function setCreateTimeAttr(){
		return time();
	}
    //获取器
    public function getCreateTimeAttr($value)
    {
        return  wordTime($value);
    }

    public function user_info()
    {
        return $this->hasOne('User','id','uid');
    }
    public function attach_info()
    {
        return $this->hasOne('Attach','id','aid');
    }

}
